package com.study.talk.data.remote

import com.study.common.annotation.Desc
import com.study.talk.data.model.UserInfo
import com.study.talk.data.model.resp.ResultResponse
import com.study.talk.data.model.vo.GroupUserInfoVo
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface FriendApi {

    @Desc("获取好友信息列表")
    @GET("/friend/userInfoList")
    suspend fun getFriends(): Response<ResultResponse<List<UserInfo>>>

    @Desc("是否为自己好友")
    @GET("/friend/isFriend/{userId}")
    suspend fun friend(@Path("userId") userId: Int): Response<ResultResponse<Boolean>>

    @Desc("查询还未在群中的好友")
    @POST("/friend/get/not/in/group/list")
    suspend fun friendNotInGroup(@Body groupUserInfo: GroupUserInfoVo): Response<ResultResponse<List<UserInfo>>>

    @Desc("删除好友")
    @DELETE("/friend/delete/{userId}")
    suspend fun deleteFriend(@Path("userId") userId: Int): Response<ResultResponse<Boolean>>


}